<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition>
	<h:panelGroup id="panelListagem" layout="block"
		rendered="#{pManagedBean.isExibirPanelGridListagem}">

		<h:panelGroup id="tabela" layout="block"
			rendered="#{pManagedBean.isExibirLista}">
			<p:panel header="#{pManagedBean.tituloListagem}" toggleable="true"
				toggleTitle="#{i18n['toggle.title']}"
				toggleSpeed="#{i18n['toggle.speed']}" collapsed="false">

				<p:dataTable id="tbl" widgetVar="widgetTable" var="item"
					value="#{pManagedBean.lista}" paginator="true"
					rows="#{pManagedBean.qtdeLinhasPadrao}"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="#{pManagedBean.opcoesLinhasPadrao}"
					emptyMessage="#{i18n.emptyMessage}"
					style="font-family:Geneva, Arial, Helvetica, sans-serif; font-size:11px;width:100%;">

					<!-- Ativar ajax no event rowSelect do p:dataTable -->
					<c:if test="#{pAtivarAjaxRowSelectDataTable}">
						<p:ajax event="rowSelect" global="false"
							update="#{pDemaisUpdatesRowSelect}" />
					</c:if>

					<ui:include src="templateLista-colunaId.xhtml" />
					<ui:insert name="colunasDataTableComAutofiltro" />

					<c:if test="#{pManagedBean.isExibirAcoesPadrao}">
						<ui:include src="templateLista-colunaAcoes.xhtml" />
					</c:if>

					<!-- esta opcao é pra quando existir subtables -->
					<ui:insert name="subTable" />

				</p:dataTable>
			</p:panel>
		</h:panelGroup>
	</h:panelGroup>

</ui:composition>

</html>